#include "MainWindow.h"
#include "ProductsParser.h"
#include "CustomersParser.h"
#include "Shop.h"
#include <QApplication>
#include <QDir>

/*
 * Use'/' as directory separator regardless of operating system.
 * Reason: QFile expects '/' as directory separator regardless of operating system.
 */
const QString s_default_csv_products = QDir::currentPath( ) + "/csv/all_products.csv";
const QString s_default_csv_customers = QDir::currentPath( ) + "/csv/customers.csv";
// const QString s_default_csv_invoices = QDir::currentPath( ) + "/csv/invoices.csv";
const QString s_default_csv_invoices = QDir::currentPath( ) + "/csv/writed_invoices.csv";

int main( int argc, char *argv[] )
{
    QApplication a( argc, argv );

    ecocity::Shop shop( s_default_csv_products,
                        s_default_csv_customers,
                        s_default_csv_invoices );

    MainWindow w( shop );

    w.setWindowTitle( "Administrador Ecocity" );

    w.show( );
    
    return a.exec( );
}
